<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
	function checkValue(args) {
		var title=document.getElementById("title").value;
		var content=document.getElementById("content").value;
		
		if(title==""){
			alert("제목을 입력하세요.");
			return;
		}else if(content==""){
			alert("내용을 입력하세요.");
			return;
		}
		document.updateForm.submit();
	}
	
	function cancelWriting() {
		if(confirm("취소하시겠습니까?"))
			history.back();
	}
</script>
</head>
<body>
<c:import url="../common/top.jsp"></c:import>
<div class="container" style="margin: 30px;"></div>

<div class="container">
<div class="row">
<div class="col-sm-2 col-md-2- col-lg-2"></div>
<!--  -->
<div class="col-xs-12 col-sm-8 col-md-8- col-lg-8">
	<hr color="lightgray">
<div style="height: 10px; background-color: white;"></div>
<font style="font-weight: bold; font-size: 20px;">공지사항</font><p><p>
공지사항 수정하기<br>
<c:if test="${ sessionScope.adminVo!=null }">
<form action="/OffTheRecord/updateNotice.action" name="updateForm">
<input type="hidden" name="noticeId" value="${ requestScope.nvo.noticeId }">
제목 : <input type="text" class="form-control" value="${ requestScope.nvo.noticeTitle }" id="title" name="updateTitle"><br>
내용 : <textarea rows="15" class="form-control" cols="40" id="content" name="updateContent">
${ requestScope.nvo.noticeContent }
</textarea><br>
<div align="center"><br>
<input type="button" value="확인" onclick="checkValue()" class="btn btn-default btn-sm">
<input type="button" value="취소" onclick="cancelWriting()" class="btn btn-default btn-sm">
</div>
</c:if>
</form>
</body>
</html>